From 2df6174038d56c9a458cc62f002dbc78086f0b98 Mon Sep 17 00:00:00 2001 From: Pavel Vasin Date: Wed, 21 Aug 2013 14:59:45 +0400 Subject: [PATCH] GtkClipboardWayland: Fix memory leak https://bugzilla.gnome.org/show_bug.cgi?id=706493 --- gtk/gtkclipboard-wayland.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk/gtkclipboard-wayland.c b/gtk/gtkclipboard-wayland.c index 925de30bf6..328ba4df41 100644 --- a/gtk/gtkclipboard-wayland.c +++ b/gtk/gtkclipboard-wayland.c @@ -278,6 +278,7 @@ gtk_clipboard_wayland_request_contents (GtkClipboard *gtkclipboard, GdkDeviceManager *device_manager; GdkDevice *device; ClipboardRequestClosure *closure; + gchar *mime_type; device_manager = gdk_display_get_device_manager (gdk_display_get_default ()); device = gdk_device_manager_get_client_pointer (device_manager); @@ -312,10 +313,14 @@ gtk_clipboard_wayland_request_contents (GtkClipboard *gtkclipboard, closure->target = target; /* TODO: Do we need to check that target is valid ? */ + mime_type = gdk_atom_name (target); + gdk_wayland_device_request_selection_content (device, - gdk_atom_name (target), + mime_type, _request_generic_cb, closure); + + g_free (mime_type); } static void -- 2.30.2